.POWER_ON
.LOAD CALCUL.DLL

* select app pki
00 A4 04 00 10 A0000000770100700A1000F100000100

* select MF
00 A4 00 00 02 3F00 (9000)

* create DF 50 15 cosmo OK
;00 E0 00 00 11 62 0F 82 01 38 83 02 50 15 86 06 00 00 00 00 00 00

* select DF
00 A4 00 00 02 5015	(9000)
* DNIe 62 13 82 01  38 83 02 50  15 85 02 00  12 86 06 20 00 20 00 20  00 
* azul 62 13 82 01  38 83 02 50  15 85 02 00  00 86 06 00 00 00 00 00  00 

* select EF 340X
00 A4 00 00 02 3402 (9000)

.DEFINE 			%counter	R(5;1)
.SET_BUFFER 		J 			R(6;1)	* last register's length
.SET_BUFFER 		K 			00		* first register
.SET_BUFFER 		L 			R(5;1)	* 
.DECREASE_BUFFER	L 			01		* last register

* read EF 340X
.BEGIN_LOOP
.SWITCH K
.CASE L
00 B0 K 00 J
.BREAK
.DEFAULT
00 B0 K 00 00
.BREAK
.ENDSWITCH
.INCREASE_BUFFER K 01
.LOOP %counter /HEX

; 6E00 class not supoorted
.POWER_OFF